package ad.android.model;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import ad.android.util.Constants;

/**
 * TblDeveloper entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tbl_developer", catalog = Constants.CATALOG)
public class Developer implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1398370972643019791L;
	private Long id;
	private String devName;
	private String devPassword;
	private String devSex;
	private Date devBirthday;
	private String devEmail;
	private Set<Application> tblApplications = new HashSet<Application>(0);
	/**
	 * 手机号码
	 */
	private String mobileNum;
	/**
	 *qq
	 */
	private String qq;
	/**
	 * msn
	 */
	private String msn;
	/**
	 * 地址
	 */
	private String address;
	/**
	 * 邮政编码
	 */
	private String postalCode;
	/**
	 * 昵称
	 */
	private String nikeName;
	/**
	 *固定电话
	 */
	private String telphone;
	/**
	 * 公司名称
	 */
	private String companyName;
	/**
	 *公司网站
	 */
	private String companySite;
	/**
	 *公司地址
	 */
	private String companyAddress;
	// Constructors

	/** default constructor */
	public Developer() {
	}

	public Developer(Long id) {
		this.id = id;
	}

	/** full constructor */
	public Developer(String devName, String devPassword, String devSex,
			Date devBirthday, String devEmail,
			Set<Application> tblApplications) {
		this.devName = devName;
		this.devPassword = devPassword;
		this.devSex = devSex;
		this.devBirthday = devBirthday;
		this.devEmail = devEmail;
		this.tblApplications = tblApplications;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name = "ID", unique = true, nullable = true)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "DEV_NAME", length = 200)
	public String getDevName() {
		return this.devName;
	}

	public void setDevName(String devName) {
		this.devName = devName;
	}

	@Column(name = "DEV_PASSWORD", length = 45)
	public String getDevPassword() {
		return this.devPassword;
	}

	public void setDevPassword(String devPassword) {
		this.devPassword = devPassword;
	}

	@Column(name = "DEV_SEX", length = 1)
	public String getDevSex() {
		return this.devSex;
	}

	public void setDevSex(String devSex) {
		this.devSex = devSex;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "DEV_BIRTHDAY")
	public Date getDevBirthday() {
		return this.devBirthday;
	}

	public void setDevBirthday(Date devBirthday) {
		this.devBirthday = devBirthday;
	}

	@Column(name = "DEV_EMAIL")
	public String getDevEmail() {
		return this.devEmail;
	}

	public void setDevEmail(String devEmail) {
		this.devEmail = devEmail;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tblDeveloper")
	public Set<Application> getTblApplications() {
		return this.tblApplications;
	}

	public void setTblApplications(Set<Application> tblApplications) {
		this.tblApplications = tblApplications;
	}
	
	@Column(name = "DEV_ADDRESS", length = 200)
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	@Column(name = "DEV_COMPANY_ADDRESS", length = 200)
	public String getCompanyAddress() {
		return companyAddress;
	}

	public void setCompanyAddress(String companyAddress) {
		this.companyAddress = companyAddress;
	}
	@Column(name = "DEV_COMPANY_NAME", length = 200)
	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	@Column(name = "DEV_COMPANY_SITE", length = 200)
	public String getCompanySite() {
		return companySite;
	}

	public void setCompanySite(String companySite) {
		this.companySite = companySite;
	}
	@Column(name = "DEV_MOBILENUM", length = 20)
	public String getMobileNum() {
		return mobileNum;
	}

	public void setMobileNum(String mobileNum) {
		this.mobileNum = mobileNum;
	}
	@Column(name = "DEV_MSN", length = 20)
	public String getMsn() {
		return msn;
	}

	public void setMsn(String msn) {
		this.msn = msn;
	}
	@Column(name = "DEV_NIKENAME", length = 50)
	public String getNikeName() {
		return nikeName;
	}

	public void setNikeName(String nikeName) {
		this.nikeName = nikeName;
	}
	@Column(name = "DEV_POSTALCODE", length = 50)
	public String getPostalCode() {
		return postalCode;
	}

	public void setPostalCode(String postalCode) {
		this.postalCode = postalCode;
	}
	@Column(name = "DEV_QQ", length = 50)
	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}
	@Column(name = "DEV_TELPHONE", length = 50)
	public String getTelphone() {
		return telphone;
	}

	public void setTelphone(String telphone) {
		this.telphone = telphone;
	}

}